
<!DOCTYPE html>
<!--

    Copyright (c) 2017, 2019 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->
<!-- Portions Copyright [2019] [Payara Foundation and/or its affiliates] -->
<html lang="en">
  <head>
    <meta charset="utf-8"/>
    <title>install-node-ssh</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="css/style.css" rel="stylesheet">
    <script src="https://use.fontawesome.com/96c4d89611.js"></script>
  </head>
  <body>
<table id="doc-title" cellspacing="0" cellpadding="0">
  <tr>
  <td align="left" valign="top">
  <b>install-node-ssh</b><br />
  </td>
  </tr>
</table>
<hr />

<table width="90%" id="top-nav" cellspacing="0" cellpadding="0">
	<colgroup>
		<col width="12%"/>
		<col width="12%"/>
		<col width="*"/>
	</colgroup>
	<tr>
		<td align="left">
		<a href="install-node-dcom.html">
			<span class="vector-font"><i class="fa fa-arrow-circle-left" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Previous</span>
		</a>
		</td>

		<td align="left">
		<a href="jms-ping.html">
			<span class=" vector-font"><i class="fa fa-arrow-circle-right vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Next</span>
		</a>
		</td>

		<td align="right">
		<a href="toc.html">
			<span class=" vector-font"><i class="fa fa-list vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Contents</span>
		</a>
		</td>
	</tr>
</table>


<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p><a id="install-node-ssh-1"></a><a id="GSRFM628"></a><a id="install-node-ssh"></a></p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_install_node_ssh">install-node-ssh</h2>
<div class="sectionbody">
<div class="paragraph">
<p>installs \{product---name} software on specified SSH-enabled hosts</p>
</div>
<div id="sthref1267" class="paragraph">
<p>Synopsis</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code class="language-oac_no_warn" data-lang="oac_no_warn">asadmin [asadmin-options] install-node-ssh [--help]
[--archive archive]
[--create={false|true}] [--save[={false|true}]
[--installdir as-install-parent]
[--sshport ssh-port] [--sshuser ssh-user]
[--sshkeyfile ssh-keyfile]
[--force={false|true}]
host-list</code></pre>
</div>
</div>
<div id="sthref1268" class="paragraph">
<p>Description</p>
</div>
<div class="paragraph">
<p>The <code>install-node-ssh</code> subcommand installs \{product---name} software on
the hosts that are specified as the operand of the subcommand. This
subcommand requires secure shell (SSH) to be configured on the host
where the subcommand is run and on each host where the \{product---name}
software is being installed.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">
<div class="paragraph">
<p>This subcommand is equivalent to the
<a href="install-node.html#install-node-1"><code>install-node</code>(1)</a> subcommand. To
install \{product---name} software on hosts that use the Distributed
Component Object Model (DCOM) remote protocol, use the
<a href="install-node-dcom.html#install-node-dcom-1"><code>install-node-dcom</code>(1)</a>
subcommand.</p>
</div>
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>If necessary, the subcommand creates a ZIP archive of the
\{product---name} software from the installation where this subcommand
is run. The archive does not contain the <code>domains</code> directory or the
<code>nodes</code> directory. These directories are synchronized from the domain
administration server (DAS) when instances on nodes that represent the
hosts are created and started. The subcommand does not delete the
archive after installing the \{product---name} software from the archive
on the specified hosts.</p>
</div>
<div class="paragraph">
<p>If multiple hosts are specified, the configuration of the following
items is the same on all hosts:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Base installation directory</p>
</li>
<li>
<p>SSH port</p>
</li>
<li>
<p>SSH user</p>
</li>
<li>
<p>SSH key file</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>If the SSH key file does not exist on a host where the \{product---name}
software is to be installed, the subcommand runs interactively and
prompts for a password. To enable the subcommand to run
noninteractively, the following conditions must be met:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>The <code>--interactive</code> option of the
<a href="asadmin.html#asadmin-1m"><code>asadmin</code>(1M)</a> utility must be <code>false</code>.</p>
</li>
<li>
<p>The <code>--passwordfile</code> option of the <code>asadmin</code> utility must specify a
password file.</p>
</li>
<li>
<p>The password file must contain the <code>AS_ADMIN_SSHPASSWORD</code> entry.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>The subcommand does not modify the configuration of the DAS.</p>
</div>
<div class="paragraph">
<p>This subcommand is supported in local mode only.</p>
</div>
<div id="sthref1269" class="paragraph">
<p>Options</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">asadmin-options</dt>
<dd>
<p>Options for the <code>asadmin</code> utility. For information about these
options, see the <a href="asadmin.html#asadmin-1m"><code>asadmin</code>(1M)</a> help page.</p>
</dd>
<dt class="hdlist1"><code>--help</code></dt>
<dt class="hdlist1"><code>-?</code></dt>
<dd>
<p>Displays the help text for the subcommand.</p>
</dd>
<dt class="hdlist1"><code>--archive</code></dt>
<dd>
<p>The absolute path to the archive file of the \{product---name}
software that is to be installed. If no archive file is specified, the
subcommand creates an archive from the installation of
\{product---name} software from which the subcommand is run. This
archive is created in the home directory of the user that is running
the command.</p>
</dd>
<dt class="hdlist1"><code>--create</code></dt>
<dd>
<p>Specifies whether the subcommand should create an archive file of the
\{product---name} software to install.<br></p>
<div class="dlist">
<dl>
<dt class="hdlist1"><code>false</code></dt>
<dd>
<p>No archive file is created. The subcommand installs the software
from the existing archive file that the <code>--archive</code> option specifies
(default).</p>
</dd>
<dt class="hdlist1"><code>true</code></dt>
<dd>
<p>The subcommand creates an archive file from the installation of
\{product---name} software from which the subcommand is run.</p>
</dd>
</dl>
</div>
</dd>
<dt class="hdlist1"><code>--save</code></dt>
<dd>
<p>Specifies whether the archive file from which the software is
installed is saved after installation.<br></p>
<div class="dlist">
<dl>
<dt class="hdlist1"><code>false</code></dt>
<dd>
<p>The archive file is not saved. The subcommand deletes the file after
installing the software (default).</p>
</dd>
<dt class="hdlist1"><code>true</code></dt>
<dd>
<p>The archive file is saved.</p>
</dd>
</dl>
</div>
</dd>
<dt class="hdlist1"><code>--installdir</code></dt>
<dd>
<p>The absolute path to the parent of the base installation directory
where the \{product---name} software is to be installed on each host,
for example, <code>/export/glassfish3/</code>. If the directory does not exist,
the subcommand creates the directory.<br>
The user that is running this subcommand must have write access to the
specified directory. Otherwise, an error occurs.<br>
To overwrite an existing an installation of the \{product---name}
software, set the <code>--force</code> option to <code>true</code>. If the directory already
contains an installation and the <code>--force</code> option is <code>false</code>, an error
occurs.<br>
The default is the parent of the base installation directory of the
\{product---name} software on the host where this subcommand is run.</p>
</dd>
<dt class="hdlist1"><code>--sshport</code></dt>
<dd>
<p>The port to use for SSH connections to the host where the
\{product---name} software is to be installed. The default is 22.</p>
</dd>
<dt class="hdlist1"><code>--sshuser</code></dt>
<dd>
<p>The user on the host where the \{product---name} software is to be
installed that is to run the process for connecting through SSH to the
host. The default is the user that is running this subcommand. To
ensure that the DAS can read this user&#8217;s SSH private key file, specify
the user that is running the DAS process.</p>
</dd>
<dt class="hdlist1"><code>--sshkeyfile</code></dt>
<dd>
<p>The absolute path to the SSH private key file for user that the
<code>--sshuser</code> option specifies. This file is used for authentication to
the <code>sshd</code> daemon on the host.<br>
The user that is running this subcommand must be able to reach the
path to the key file and read the key file.<br>
The default is a key file in the user&#8217;s <code>.ssh</code> directory. If multiple
key files are found, the subcommand uses the following order of
preference:<br></p>
<div class="olist arabic">
<ol class="arabic">
<li>
<p><code>id_rsa</code></p>
</li>
<li>
<p><code>id_dsa</code></p>
</li>
<li>
<p><code>identity</code></p>
</li>
</ol>
</div>
</dd>
<dt class="hdlist1"><code>--force</code></dt>
<dd>
<p>Specifies whether the subcommand overwrites an existing installation
of the \{product---name} software in the directory that the
<code>--installdir</code> option specifies. Possible values are as follows:<br></p>
<div class="dlist">
<dl>
<dt class="hdlist1"><code>false</code></dt>
<dd>
<p>The existing installation is not overwritten (default).</p>
</dd>
<dt class="hdlist1"><code>true</code></dt>
<dd>
<p>The existing installation is overwritten.</p>
</dd>
</dl>
</div>
</dd>
</dl>
</div>
<div id="sthref1270" class="paragraph">
<p>Operands</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">host-list</dt>
<dd>
<p>A space-separated list of the names of the hosts where the
\{product---name} software is to be installed.</p>
</dd>
</dl>
</div>
<div id="sthref1271" class="paragraph">
<p>Examples</p>
</div>
<div class="paragraph">
<p><a id="GSRFM629"></a><a id="sthref1272"></a></p>
</div>
<div class="paragraph">
<p>Example 1   Installing \{product---name} Software at the Default
Location</p>
</div>
<div class="paragraph">
<p>This example installs \{product---name} software on the hosts
<code>sj03.example.com</code> and <code>sj04.example.com</code> at the default location.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code class="language-oac_no_warn" data-lang="oac_no_warn">asadmin&gt; install-node-ssh sj03.example.com sj04.example.com
Created installation zip /home/gfuser/glassfish2339538623689073993.zip
Successfully connected to gfuser@sj03.example.com using keyfile /home/gfuser
/.ssh/id_rsa
Copying /home/gfuser/glassfish2339538623689073993.zip (81395008 bytes) to
sj03.example.com:/export/glassfish3
Installing glassfish2339538623689073993.zip into sj03.example.com:/export/glassfish3
Removing sj03.example.com:/export/glassfish3/glassfish2339538623689073993.zip
Fixing file permissions of all files under sj03.example.com:/export/glassfish3/bin
Successfully connected to gfuser@sj04.example.com using keyfile /home/gfuser
/.ssh/id_rsa
Copying /home/gfuser/glassfish2339538623689073993.zip (81395008 bytes) to
sj04.example.com:/export/glassfish3
Installing glassfish2339538623689073993.zip into sj04.example.com:/export/glassfish3
Removing sj04.example.com:/export/glassfish3/glassfish2339538623689073993.zip
Fixing file permissions of all files under sj04.example.com:/export/glassfish3/bin
Command install-node-ssh executed successfully</code></pre>
</div>
</div>
<div id="sthref1273" class="paragraph">
<p>Exit Status</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">0</dt>
<dd>
<p>command executed successfully</p>
</dd>
<dt class="hdlist1">1</dt>
<dd>
<p>error in executing the command</p>
</dd>
</dl>
</div>
<div id="sthref1274" class="paragraph">
<p>See Also</p>
</div>
<div class="paragraph">
<p><a href="asadmin.html#asadmin-1m"><code>asadmin</code>(1M)</a></p>
</div>
<div class="paragraph">
<p><a href="install-node.html#install-node-1"><code>install-node</code>(1)</a>,
<a href="install-node-dcom.html#install-node-dcom-1"><code>install-node-dcom</code>(1)</a>,
<a href="uninstall-node.html#uninstall-node-1"><code>uninstall-node</code>(1)</a>,
<a href="uninstall-node-ssh.html#uninstall-node-ssh-1"><code>uninstall-node-ssh</code>(1)</a></p>
</div>
</div>
</div>

<hr />

<table width="90%" id="bottom-nav" cellspacing="0" cellpadding="0">
	<colgroup>
		<col width="12%"/>
		<col width="12%"/>
		<col width="*"/>
	</colgroup>
	<tr>		
		<td align="left">
		<a href="install-node-dcom.html">
			<span class=" vector-font"><i class="fa fa-arrow-circle-left" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Previous</span>
		</a>
		</td>

		<td align="left">
		<a href="jms-ping.html">
			<span class="vector-font"><i class="fa fa-arrow-circle-right vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Next</span>
		</a>
		</td>

		<td align="right">
		<a href="toc.html">
			<span class="vector-font"><i class="fa fa-list vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Contents</span>
		</a>
		</td>
	</tr>
</table>

<span id="copyright">
        <img src="/resource/reference/img/eclipse_foundation_logo_tiny.png" height="20px" alt="Eclipse Foundation Logo" align="top"/>&nbsp;            
        <span >Copyright&nbsp;&copy;&nbsp;2019,&nbsp;Oracle&nbsp;and/or&nbsp;its&nbsp;affiliates.&nbsp;All&nbsp;rights&nbsp;reserved.</span>
</span>

</body>
</html>
